From: Jasper St. Pierre Date: Sun, 3 Mar 2013 18:56:12 +0000 (-0500) Subject: viewSelector: Move the loupe icon to the primary slot X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4581 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=39610e6933c1fa3bc3a43ad6742ca4122ffaf862;p=gnome-shell.git viewSelector: Move the loupe icon to the primary slot This matches the behavior in GTK+. See the rationale there. https://bugzilla.gnome.org/show_bug.cgi?id=695069 --- diff --git a/js/ui/viewSelector.js b/js/ui/viewSelector.js index 011855fb5..0fd242de8 100644 --- a/js/ui/viewSelector.js +++ b/js/ui/viewSelector.js @@ -83,11 +83,10 @@ const ViewSelector = new Lang.Class({ this._entry.connect('notify::mapped', Lang.bind(this, this._onMapped)); global.stage.connect('notify::key-focus', Lang.bind(this, this._onStageKeyFocusChanged)); - this._inactiveIcon = new St.Icon({ style_class: 'search-entry-icon', - icon_name: 'edit-find-symbolic' }); - this._activeIcon = new St.Icon({ style_class: 'search-entry-icon', - icon_name: 'edit-clear-symbolic' }); - this._entry.set_secondary_icon(this._inactiveIcon); + this._entry.set_primary_icon(new St.Icon({ style_class: 'search-entry-icon', + icon_name: 'edit-find-symbolic' })); + this._clearIcon = new St.Icon({ style_class: 'search-entry-icon', + icon_name: 'edit-clear-symbolic' }); this._iconClickedId = 0; this._capturedEventId = 0; @@ -376,7 +375,7 @@ const ViewSelector = new Lang.Class({ this._searchResults.startingSearch(); if (this._searchActive) { - this._entry.set_secondary_icon(this._activeIcon); + this._entry.set_secondary_icon(this._clearIcon); if (this._iconClickedId == 0) this._iconClickedId = this._entry.connect('secondary-icon-clicked', @@ -396,7 +395,7 @@ const ViewSelector = new Lang.Class({ this._searchTimeoutId = 0; } - this._entry.set_secondary_icon(this._inactiveIcon); + this._entry.set_secondary_icon(null); this._searchCancelled(); } },